﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using GreenGrass.Models;
using WebMatrix.WebData;

namespace GreenGrass.Controllers
{
    public class AccountManagementController : Controller
    {
        //
        // GET: /AccountManagement/

        public ActionResult Index()
        {
            using (var db = new UsersContext())
            {
                var us = db.UserProfiles.ToArray();

                return View(us);
            }
        }

        public ActionResult GetUser(int id)
        {
            return View(new UsersContext().UserProfiles.Where(u=>u.UserId.Equals(id)).First());
        }

    }
}
